<template>
    <h3>数组变化侦听</h3>
    <button @click="addListHandler">添加数据</button>
    <ul>
        <li v-for="(item,index) of names" :key="index">{{ item }}</li>
    </ul>
</template>

<script>
    export default {
        data() {
            return {
                names: ["daniel", "qudret", "feruq"]
            }
        },
        methods: {
            addListHandler() {
                // this.names.push("shakira");
                this.names = this.names.concat(["shakira"])
            }
        }
    }
</script>
<style>

</style>